<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ng-model-options 设置数据同步时</title>
    <script src="../angular.js"></script>
</head>
<body>

<div ng-app="gg" ng-controller="ctrl">
    <!--ng-model-options -->
    <!--uodateOn:''blur 失去焦点时同步-->
    <!--debounce:3000 3秒后更新-->
    <!--<input type="text" ng-model="title" ng-model-options="{debounce:3000}">-->
    <!--{updateOn : 'default blur', debounce : {default : 1000, blur : 0} 输入时每隔一秒更新，失去焦点时立即更新-->
    <input type="text" ng-model="title" ng-model-options="{updateOn : 'default blur', debounce : {default : 1000, blur: 0} }">
    {{title}}
</div>

<script>
    var mod = angular.module('gg', []);
    mod.controller('ctrl', ['$scope', function ($scope) {
//        $scope.user = [
//            {name:'gg', age: 22},
//            {name:'qc', age: 18}
//        ];
    }])
</script>
</body>
</html>